package chpt02;

public class MethodDemo02 {

	public static void main(String[] args) {
		int sumA = MethodDemo02.addInt(2, 3); // 调用整数的加法操作
		float sumB = addFloat(10.2f, 3.5f); // 调用浮点数的加法操作
		System.out.println("sumA=" + sumA);
		System.out.println("sumB=" + sumB);
	}
	// addInt()方法定义
	public static int addInt(int x, int y) {
		return x + y;
	}
    // addFolat()方法定义
	public static float addFloat(float x, float y) {
		return x + y;
	}
}
